#ifndef _OBJECT_H_
#define _OBJECT_H_

#include <SDL2/SDL.h>

struct Player
{
    SDL_Texture* texture = nullptr;
    SDL_FPoint position = {0, 0};
    int width = 0;
    int height = 0;
    int speed = 300;
    int currentHealth = 3;
    uint32_t coolDown = 300; // 冷却时间
    uint32_t lastShootTime = 0; // 上次射击时间
};

struct ProjectilePlayer{
    SDL_Texture* texture = nullptr;
    SDL_FPoint position = {0, 0};
    int width = 0;
    int height = 0;
    int speed = 400;
    int damage = 1; // 伤害值
};

struct Enemy{
    SDL_Texture* texture = nullptr;
    SDL_FPoint position = {0, 0};
    int width = 0;
    int height = 0;
    int speed = 100;
    int currentHealth = 1;
    Uint32 coolDown = 1000;
    Uint32 lastShootTime = 0;
};

struct ProjectileEnemy{
    SDL_Texture* texture = nullptr;
    SDL_FPoint position = {0, 0};
    SDL_FPoint direction = {0, 0};
    int width = 0;
    int height = 0;
    int speed = 200;
    int damage = 1; // 伤害值
};

struct Explosion{
    SDL_Texture* texture = nullptr;
    SDL_FPoint position = {0, 0};
    int width = 0;
    int height = 0;
    int currentFrame = 0;
    int totlaFrame = 0;
    Uint32 startTime = 0;
    Uint32 FPS = 10;
};

#endif
